import requests
import re
import json

url = 'https://haokan.baidu.com/?sfrom=baidu-top'

headers = {
    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36',
}
response = requests.get(url, headers=headers)
result = re.search(r'"top_video_list":(\[.*?])', response.text).group(1)
datas = json.loads(result)
for data in datas:
    print(data['title'],data['play_url'])

